package com.feng.controller;

import com.feng.domain.ResponseResult;
import com.feng.service.OssUpLoadService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
@Api(tags = "头像上传")
public class UploadController {

    @Autowired
    private OssUpLoadService upLoadService;

    @ApiImplicitParam(name = "img", value = "照片文件")
    @PostMapping("/upload")
    public ResponseResult upLoad(MultipartFile img){
        return upLoadService.upLoad(img);
    }
}
